<template>
	<mp-wx v-if="isSimple"></mp-wx>
	<swiper duration="300"
					style="width: 100%;height: calc(100vh);" 
					skip-hidden-item-layout="true"
					v-else>
		<swiper-item>
			<lucky-dog />
		</swiper-item>
		<swiper-item>
			<ssq-list />
		</swiper-item>
	</swiper>
</template>

<script>
	import LuckyDog from "../../components/com_page/luckydog.vue"
	import SsqList from "../../components/com_page/ssqlist.vue"
	import MpWx from "../../components/com_page/mp-wx.vue"
	import util from "../../util/util.js"
	export default {
		components:{
			LuckyDog,
			SsqList,
			MpWx
		},
		data() {
			return {
				isSimple: true
			}
		},
		onLoad() {
			let appPF = util.getPlayForm()
			let notSimple = uni.getStorageSync('not-simple') || false
			if (appPF == 'mp-wx' && !notSimple) {
				this.isSimple = true
			} else {
				this.isSimple = false
			}
			let oldDate = uni.getStorageSync('useDate')
			let date = util.formatDate(new Date(),'')
			if (oldDate != date) {
				uni.setStorageSync('useDate',date)
				uni.removeStorageSync('ssqData')
			}
		},
		methods: {

		},
		onShareAppMessage(){
			return {
			  path: '/pages/index/index',
			}
		}
	}
</script>

<style></style>
